First iteration of circuits naming convention#341
Merged
Conversation
arnaucube
approved these changes
Jul 15, 2025
Collaborator
arnaucube
left a comment
There was a problem hiding this comment.
Nice, much better now! ^^
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR I remove all
*Gadgettypes and instead implement the naming convention defined here #181 (comment)The biggest changes can be summarised by:
*Gadgettypes and theireval_*methods in favour ofverb_object_circuitfunctions.I'm specially happy about the changes from b), I think they make the flow of data in the circuit more clear.
Missing things that I did not address in this PR
build.*Targettypes that have methods that define constraints. I think we can keep those as they are convenient and I don't see them as strongly breaking the new convention: I see them as the object-oriented way to apply the convention. In those cases theobjectcan be omitted from the method when it's implied by the type name, and the_circuitsuffix doesn't appear because it's implied by the fact that the type is a*Target. Examples are:SignatureTarget::verify -> BoolTarget,StatementTarget::has_native_type -> BoolTargetorOperationTypeTarget::as_custom -> (BoolTarget, HashOutTarget, Target).